Dynomotion

Group: DynoMotion Message: 11431 From: Tom Kerekes Date: 4/18/2015
Subject: Re: Difference between M3 MDI and spindle on button in KMotion-CNC 4
Hi SJH,

That makes sense.  The "on cw" button is executed as part of the Windows GUI.  If M3 is configured to wait then the GUI will wait (hang) until the M3 completes.  If M3 tries to use the GUI and waits for it to complete there will be a deadlock.

M3 commands are not expected to block for long periods.

I suppose having the GUI invoke the M3 from a worker thread would be a solution although I'm not sure what any side implications would be.

Regards
TK


Group: DynoMotion Message: 11435 From: Hardy Family Date: 4/22/2015
Subject: Re: Difference between M3 MDI and spindle on button in KMotion-CNC 4
This seems to be more of a problem with 433k than 432.  Although I am running 433k now, I recall that it did not have this problem in 432.

For example, if a hardware error is detected (missing index pulse) my axis reffing routine can prompt the user to retry/cancel, and I tested this under 432, and it worked.  Just now I was experimenting with the cabling and lost the index pulse: under 433k it just locked the app.  Several other cases can also result in user prompts, but I really don't want to have to run all these things using MDI or g-code.  And I don't really like the idea of just failing and leaving the axes disabled, and requiring some arcane action on the part of the operator, say to retrieve the last error code.

So, I would respectfully request that you take a look and see if this is something that regressed since 432.  The reason I am using 433k is because you mentioned that it fixed a tool table index issue, and I was working on tool change at the time.

Regards,
SJH


On Sat, Apr 18, 2015 at 4:11 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi SJH,

That makes sense.  The "on cw" button is executed as part of the Windows GUI.  If M3 is configured to wait then the GUI will wait (hang) until the M3 completes.  If M3 tries to use the GUI and waits for it to complete there will be a deadlock.

M3 commands are not expected to block for long periods.

I suppose having the GUI invoke the M3 from a worker thread would be a solution although I'm not sure what any side implications would be.

Regards
TK


Group: DynoMotion Message: 11437 From: leo.vetterli Date: 4/23/2015
Subject: Re: Difference between M3 MDI and spindle on button in KMotion-CNC 4
I have encountered same problem. If you configure exec/wait you can not use dialog boxes. In order to use dialog boxes one has to configure exec only.

I find this a disadvantage. There are a couple scenarios that one would want to prompt a message to the user before the G-Code continues.
This is possible with (MSG, ) but not with within a C-program.
I would vote for the possibility to be able to use exec/wait.
Unfortunately this behavior is not documented.

Leo 
Group: DynoMotion Message: 11438 From: Tom Kerekes Date: 4/23/2015
Subject: Re: Difference between M3 MDI and spindle on button in KMotion-CNC 4
We will look into this and hopefully come up with a better solution.  No promises.  We're open to suggestions. All the source code for this is available in the download.

A workaround might be to have the M3 C program if it detects an error Halt or Abort the GCode, set a global error code, and terminate.  This would unlock the KMotionCNC GUI.  Then the Init Thread could detect the Global code and display an appropriate message.

Regards
TK



Group: DynoMotion Message: 11439 From: Hardy Family Date: 4/23/2015
Subject: Re: Difference between M3 MDI and spindle on button in KMotion-CNC 4
Hi Tom,

That fix might work for some cases, but for most cases I have developed, the user response to the dialog (retry or cancel) is required: in many cases, the user can fix whatever is causing the problem, then it makes sense to "retry".  Without this, it only makes sense to have a single button, but that is unnecessarily disruptive to the program flow, for cases where it is easy for the user to fix something like forgetting to turn on the compressed air for the spindle collet.

I'm not a windows programmer, so I am not competent to judge the implementation difficulties in this situation.  In the Linux world, it's fairly easy to add I/O file descriptors to the GUI event processor, but of course the I/O needs to be made non-blocking.  Windows has the concept of "overlapped I/O" if I remember correctly.

Regards,
SJH



On Thu, Apr 23, 2015 at 1:20 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

We will look into this and hopefully come up with a better solution.  No promises.  We're open to suggestions. All the source code for this is available in the download.

A workaround might be to have the M3 C program if it detects an error Halt or Abort the GCode, set a global error code, and terminate.  This would unlock the KMotionCNC GUI.  Then the Init Thread could detect the Global code and display an appropriate message.

Regards
TK